__________________________________________________________________________________________________
class Solution {
	    public int maxNumberOfApples(int[] arr) {
	        Arrays.sort(arr);
	        int W = 5000;
	        int ct = 0;
	        for(int v : arr){
	        	if(v <= W){
	        		W -= v;
	        		ct++;
	        	}
	        }
	        return ct;
	    }
	}
__________________________________________________________________________________________________

__________________________________________________________________________________________________
